1. Field of the Invention
The present invention relates to a technology of coding moving pictures by using motion compensation prediction and, more particularly, to a moving picture coding device, a moving picture coding method and a moving picture coding program, and a moving picture decoding device, a moving picture decoding method and a moving picture decoding program that code motion information used in motion compensation prediction.
2. Description of the Related Art
Motion compensation prediction is used in commonly-used moving-picture compression coding. Motion compensation prediction is a technology of partitioning a target picture into small blocks and generating, as a prediction signal, a signal located at a position moved from a target block of the target picture to a reference block of a reference picture based on the amount of motion indicated by a motion vector, the reference picture being a decoded picture. Motion compensation prediction includes uni-prediction performed using a single motion vector and bi-prediction performed using two motion vectors.
Regarding motion vectors, a motion vector of a coded block neighboring a target block is set to be a motion vector predictor (also simply referred to as “vector predictor”), and a difference between a motion vector of the target block and the vector predictor is obtained and transmitted as a coding vector so as to improve compression efficiency.
Moving-picture compression coding such as MPEG-4AVC/H.264 (hereinafter, AVC) allows for highly-accurate motion compensation prediction by making the size of a block used for motion compensation to be small with variations. On the other hand, there is a problem that the code size of a coding vector becomes large when reducing the size of the block.
Thus, in AVC, the continuity of motion in a temporal direction is focused, and temporal direct motion compensation prediction is used where motion compensation is achieved, without transmitting coding vectors, by scaling a motion vector of a block of a reference picture that is located at the same position as a target block and using the scaled motion vector as a motion vector of the target block.
Also, focusing on the continuity of motion in a spatial direction, Patent document 1 discloses a method of achieving motion compensation prediction, without transmitting coding vectors, by using a motion vector of a processed block neighboring a target block as a motion vector of the processed block.